declare type angle = number;
namespace hjc {

	export enum ClickMode {
		NONE, SCALE_RCV, LIGHT_RCV, BOTH_RCV, ALPHA_RCV,
	}

	export enum ShowMode {
		NONE, SLIGHT_IN, STRONG_IN, FADE_IN, ROTATE_IN, FALL_IN, LTR_IN, RTL_IN, TTB_IN, BTT_IN,
	}

	export enum HideMode {
		NONE, SLIGHT_OUT, STRONG_OUT, FADE_OUT, ROTATE_OUT, THROW_OUT, LTR_OUT, RTL_OUT, TTB_OUT, BTT_OUT,
	}

	export enum ToggleMode {
		NONE, ALPHA_CHG, SCALE_CHG, GLOW_CHG,
	}

	export enum GlowDegree {
		NONE, SLIGHT, NORMAL, STRONG,
	}

	export const CLICKED_SCALE = 0.8;//按下缩小
	export const CLICKED_ALPHA = 0.5;//按下透明
	export const TOGGLED_SCLAE = 1.3;//选中变大
	export const TOGGLED_ALHPA = 0.4;//非选中透明
	export const ANI_DURATION = 0.24;//动画时间

	export enum BarTextType {
		CUSTOM, RATIO, PERCENT, CUR_VALUE,
	}

	export const SkinState = {
		UP: 'up', DOWN: 'down',
		NORMAL: 'normal', ALERT: 'alert'
	}

	export const SkinViews = [hjc.Button, hjc.ToggleButton, hjc.ProgressBar, hjc.SimplePanel];
	export function isSkinView(target: any): boolean {
		for (let SkinView of SkinViews) { if (target instanceof SkinView) return true; }
		return false;
	}

	export const Default = {
		BACK_ALPHA: 0.7,
	}

	export enum Dir8 {
		UNKNOWN = -1,
		N = 0, NE, E, SE, S, SW, W, NW,
	}
}